package com.shenfa.util;

import org.json.simple.JSONObject;
@SuppressWarnings("unchecked")
public class ResultObject extends JSONObject {
	private static final long serialVersionUID = 1L;
	
	public String getCode() {
		return (String)this.get("code");
	}
	
	public void setCode(String code) {
		this.put("code", code);
	}
	public Object getData() {
		return this.get("data");
	}
	public void setData(Object data) {
		this.put("data", data);
	}
	public ResultObject(){
		
	}
	
	private ResultObject(String code, Object data){
		this.setCode(code);
		this.setData(data);
	}
	
	public static ResultObject build(String code, Object data){
		return new ResultObject(code, data);
	}		
}
